Python Tools for Scientists: An Introduction to Using Anaconda, JupyterLab, and Python’s Scientific Libraries by Lee Vaughan

Python Tools for Scientists: An Introduction to Using Anaconda, JupyterLab, and Python’s Scientific Libraries by Lee Vaughan

Author:Lee Vaughan
Language: eng
Format: epub
Publisher: No Starch Press, Inc.
Published: 2023-10-15T00:00:00+00:00


When to Use OOP

OOP is easier to appreciate when you’re writing large, complex programs because it helps you to structure your code into smaller parts that are easier to understand. It also reduces code duplication and makes code easier to maintain, update, and reuse. As a result, most commercial software is now built using OOP.

Because Python is an object-oriented programming language, you’ve already been using objects and methods defined by other people. But unlike languages such as Java, Python doesn’t force you to use OOP for your own programs. It provides ways to encapsulate and separate abstraction layers using other approaches such as procedural or functional programming.

Having this choice is important. If you implement OOP in small programs, most of them will feel overengineered. To quote computer scientist Joe Armstrong, “The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana, but what you got was a gorilla holding the banana and the entire jungle!”

As a scientist or engineer, you can get a lot done without OOP, but that doesn’t mean you should ignore it. OOP makes it easy to simulate many objects at a time, such as a flock of birds or a cluster of galaxies. It’s also important when things that are manipulated, like a GUI button or window, must persist for a long time in the computer’s memory. And because most of the scientific packages you’ll encounter are built using OOP, you’ll want more than a passing familiarity with the paradigm.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.